package com.rimi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rimi.bean.MenuBean;
import com.rimi.bean.RoleBean;
import com.rimi.dao.RoleDao;
import com.rimi.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService {
	@Autowired
	//父类的引用指向子类的对象,是多态的体现,得到的实际上就是实现类的对象
	private RoleDao rd;

	@Override
	public List getRoleInfo() {

		return rd.getRoleInfo();
	}

	@Override
	public RoleBean getRoleById(Integer id) {
		return rd.getRoleById(id);
	}

	@Override
	public List getMenuByRoleId(int id) {
		// TODO Auto-generated method stub
		
		return rd.getMenuByRoleId(id);
	}

	@Override
	public void delRole(Integer isok) {
		// TODO Auto-generated method stub
		rd.delRole(isok);
	}

	@Override
	public void addIn(RoleBean mm) {
		// TODO Auto-generated method stub
		rd.addIn(mm);
	}

	@Override
	public RoleBean selectRoleId(RoleBean r) {
		// TODO Auto-generated method stub
		return rd.selectRoleId(r);
	}

}
